<template>
  <div class="uc-menu">
    <div v-for="menuTop in menuTopList" :key="menuTop.name">
    <div class="tit">{{menuTop.menuName}}</div>
    <ul class="sublist">
      <li v-for="menu in menuTop.menuList" :key="menu.name"><router-link tag="a" :to="menu.to" >{{menu.name}}</router-link></li>
    </ul>
    </div>
  </div>
</template>
<script>
import http from '../../../base/api/http'
export default {
  name: 'UserMenu',
  data () {
    return {
      menuTopList: []
    }
  },
  methods: {
    getMenu () {
      http.requestQuickGet('/java/api/menu/getMenu').then((res) => {
        if (res.status === 0) {
          this.menuTopList = res.data
        }
      })
    }
  },
  mounted () {
    this.getMenu()
  }
}
</script>
<style></style>
